//
//  File.h
//  MandalaChar
//
//  Created by Ignacio Enriquez Gutierrez on 8/9/10.
//  Copyright (c) 2010 Nacho4D.
//  See the file license.txt for copying permission.
//
#import <UIKit/UIKit.h>
#import "Data_Model.h"
#import "SourceListItem.h"

@interface treeNode : NSObject <NSCopying> {
	
    //節點屬性
	NSString *name;
	BOOL expanded;
	NSInteger level;      
    
    
    //節點連接SourceListItem位置
    SourceListItem *parent_path_SourceListItem;
    SourceListItem *self_path_SourceListItem;
    
    
    //上一層的treeNode 可以透過此key 找到同一層的treeNode
    treeNode *parentkey;
    
    Data_Model *datamodel_n4file;    
	 
	 
	
	 UIImage *image;
	 UIImage *imageBig;
	 
    
    
}

@property (retain) NSString *name;
@property (retain) SourceListItem *parent_path_SourceListItem;
@property (retain) SourceListItem *self_path_SourceListItem; 

@property (retain) treeNode *parentkey;

@property ( readonly, assign) UIImage *image;
@property ( readonly, assign) UIImage *imageBig;
  

@property ( readonly) BOOL isDirectory; 
 
@property ( getter=isExpanded) BOOL expanded;
@property (nonatomic) NSInteger level;

- (id) initWithName:(NSString *)aName parentDirectory:(SourceListItem *)aParentDirectory selfDirectory:(SourceListItem *)aSelfDirectory datamodel:(Data_Model *)dm parentkey:(treeNode *)pkey;

@end
